import torch

A = torch.arange(20).reshape(5, 4)
B = A.clone()

print(A + B, A * B)


a = 2
X = torch.arange(24).reshape(2, 3, 4)
print(X + a)
print(X * a)